<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh">

<head th:replace="~{commons/head::head}"></head>

<body>

<!-- Main -->
<main id="main">

    <!-- Login 13 - Bootstrap Brain Component -->
    <section class="bg-light py-3 py-md-5 min-vh-100 d-flex justify-content-center align-items-center">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-12 col-sm-10 col-md-8 col-lg-6 col-xl-5 col-xxl-4">
                    <div class="card border border-light-subtle rounded-3 shadow-sm">
                        <div class="card-body p-3 p-md-4 p-xl-5">
                            <div class="text-center mb-3">
                                <a>
                                    <img th:src="@{/assets/img/branding/console-logo.svg}" alt="Logo" width="175" height="57">
                                </a>
                            </div>
                            <h2 class="fs-6 fw-normal text-center text-secondary mb-4" th:text="#{login.title}"></h2>
                            <form th:method="post" th:action="@{/login}">
                                <div class="row gy-2 overflow-hidden">
                                    <div class="col-12">
                                        <div class="form-floating mb-3">
                                            <input type="text" class="form-control" name="username" id="account" th:placeholder="#{login.hintAccount}" required>
                                            <label for="account" class="form-label" th:text="#{login.account}"></label>
                                        </div>
                                    </div>
                                    <div class="col-12">
                                        <div class="form-floating mb-3">
                                            <input type="password" class="form-control" name="password" id="password" th:placeholder="#{login.hintPassword}" required>
                                            <label for="password" class="form-label" th:text="#{login.password}"></label>
                                        </div>
                                    </div>

                                    <p class="text-start text-warning mb-0" th:text="${message}" th:style="'display:' + ${#strings.isEmpty(message)?'none':'inline-block'}"></p>

                                    <div class="col-12">
                                        <div class="d-flex gap-2 justify-content-between">
                                            <div class="form-check">
                                                <input class="form-check-input" type="checkbox" value="" name="rememberMe" id="rememberMe">
                                                <label class="form-check-label text-secondary" for="rememberMe" th:text="#{login.keep}"></label>
                                            </div>

                                            <a th:href="@{reset-password}" class="link-primary text-decoration-none" th:text="#{login.forgot}"></a>
                                        </div>
                                    </div>

                                    <div class="col-12">
                                        <div class="d-grid my-3">
                                            <button class="btn btn-primary btn-lg" type="submit" th:text="#{login.signIn}"></button>
                                        </div>
                                    </div>
                                    <div class="col-12">
                                        <p class="m-0 text-secondary text-center">
                                            <a th:text="#{login.notAccount}"></a>
                                            <a th:href="@{register}" class="link-primary text-decoration-none" th:text="#{register}"></a>
                                        </p>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

</main>

<!-- BSB Body End -->
</body>

</html>
